package com.mydemo.charging.order.repository;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mydemo.charging.common.pojo.po.ChargingBillFailPO;
import com.mydemo.charging.order.mapper.FailBillMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class FailBillRepository {
    @Autowired
    private FailBillMapper failBillMapper;

    public Long countByBillId(String billId) {
        QueryWrapper queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("bill_id",billId);
        return failBillMapper.selectCount(queryWrapper);
    }

    public void save(ChargingBillFailPO po) {
        failBillMapper.insert(po);
    }
}
